import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import { ChakraProvider } from '@chakra-ui/react';
import './index.css';
import { RouterProvider } from 'react-router-dom';
import AppRouter from './router.tsx';
import theme from './theme.ts';
import { AuthProvider } from './providers/AuthProvider.tsx';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <ChakraProvider theme={theme}>
      <AuthProvider>
        <RouterProvider router={AppRouter} />
      </AuthProvider>
    </ChakraProvider>
  </StrictMode>,
);
